package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.LsLawyerImageMapper;
import com.ruoyi.system.domain.LsLawyerImage;
import com.ruoyi.system.service.ILsLawyerImageService;

/**
 * 律师图片Service业务层处理
 * 
 * @author zhouyipeng
 * @date 2023-10-16
 */
@Service
public class LsLawyerImageServiceImpl implements ILsLawyerImageService 
{
    @Autowired
    private LsLawyerImageMapper lsLawyerImageMapper;

    /**
     * 查询律师图片
     * 
     * @param id 律师图片主键
     * @return 律师图片
     */
    @Override
    public LsLawyerImage selectLsLawyerImageById(String id)
    {
        return lsLawyerImageMapper.selectLsLawyerImageById(id);
    }

    /**
     * 查询律师图片列表
     * 
     * @param lsLawyerImage 律师图片
     * @return 律师图片
     */
    @Override
    public List<LsLawyerImage> selectLsLawyerImageList(LsLawyerImage lsLawyerImage)
    {
//        return lsLawyerImageMapper.selectLsLawyerImageList(lsLawyerImage);

        return lsLawyerImageMapper.list(lsLawyerImage);
    }

    /**
     * 新增律师图片
     * 
     * @param lsLawyerImage 律师图片
     * @return 结果
     */
    @Override
    public int insertLsLawyerImage(LsLawyerImage lsLawyerImage)
    {
        lsLawyerImage.setId(IdUtils.fastSimpleUUID());

        return lsLawyerImageMapper.insertLsLawyerImage(lsLawyerImage);
    }

    /**
     * 修改律师图片
     * 
     * @param lsLawyerImage 律师图片
     * @return 结果
     */
    @Override
    public int updateLsLawyerImage(LsLawyerImage lsLawyerImage)
    {
        return lsLawyerImageMapper.updateLsLawyerImage(lsLawyerImage);
    }

    /**
     * 批量删除律师图片
     * 
     * @param ids 需要删除的律师图片主键
     * @return 结果
     */
    @Override
    public int deleteLsLawyerImageByIds(String[] ids)
    {
        return lsLawyerImageMapper.deleteLsLawyerImageByIds(ids);
    }

    /**
     * 删除律师图片信息
     * 
     * @param id 律师图片主键
     * @return 结果
     */
    @Override
    public int deleteLsLawyerImageById(String id)
    {
        return lsLawyerImageMapper.deleteLsLawyerImageById(id);
    }

    @Override
    public List<LsLawyerImage> selectLsLawyerImageListFromC() {
        return lsLawyerImageMapper.listFromC();
    }
}
